]> dgit.raspbian.org Git - gnome-shell.git/log
gnome-shell.git
7 years agoshell: Actually make GLSLEffect an effect
Florian Müllner [Fri, 26 Jul 2019 20:08:52 +0000 (22:08 +0200)]
shell: Actually make GLSLEffect an effect

A generic, introspectable Shader effect is not only more flexible
than a shader actor, it will also make it much easier to turn
Lightbox into an actor subclass and replace Tweener with Clutter's
own animation support.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/651

7 years agoshell: Properly rename type
Florian Müllner [Fri, 26 Jul 2019 19:09:29 +0000 (21:09 +0200)]
shell: Properly rename type

This is just a find-and-replace name change to make the actual code
changes in the follow-up commit more apparent.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/651

7 years agoshell: Rename GLSLQuad to GLSLEffect
Florian Müllner [Fri, 26 Jul 2019 19:00:06 +0000 (21:00 +0200)]
shell: Rename GLSLQuad to GLSLEffect

You can guess where this is going ...

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/651

7 years agolightbox: Remove unnecessary params
Florian Müllner [Fri, 26 Jul 2019 21:17:28 +0000 (23:17 +0200)]
lightbox: Remove unnecessary params

Actors have a default origin of (0, 0), so there's no need of
setting those explicitly.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/651

7 years agotheme: Fix focus style of icons in the calendar popup
Jonas Dreßler [Sun, 28 Jul 2019 07:53:14 +0000 (09:53 +0200)]
theme: Fix focus style of icons in the calendar popup

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1474

7 years agoshellDBus: Use floats instead of percentages for OSD levels
Jonas Dreßler [Sat, 27 Jul 2019 17:29:36 +0000 (19:29 +0200)]
shellDBus: Use floats instead of percentages for OSD levels

Due to typecasting being done when converting floats to integers in
gnome-settings-daemon, a volume of 0.9% in g-s-d will end up as 0% in
gnome-shell. This can lead to a mismatch of icons between the volume OSD
(the icon to use is determined by g-s-d itself) and the shells own
volume indicator (the icon to use is determined by the shell using the
volume received from g-s-d).

To fix this, simply get rid of the conversion from float to percentage
in g-s-d and back to floats in the shell and just send a float/double
value on DBus.

https://gitlab.gnome.org/GNOME/gnome-settings-daemon/merge_requests/78
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/385

7 years agoosdWindow: Remove LevelBar and use BarLevel directly
verdre [Sat, 2 Feb 2019 16:58:47 +0000 (17:58 +0100)]
osdWindow: Remove LevelBar and use BarLevel directly

LevelBar is not really used, all the checks are implemented inside
BarLevel as well and the accessible name is wrong because the osdWindow
doesn't only show the volume, but also the brightness and other things.

The workaround for updating the bars width is also no longer needed now
that we have BarLevel.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/385

7 years agoosdWindow: Use float values as input for osdWindow
verdre [Sat, 2 Feb 2019 16:50:04 +0000 (17:50 +0100)]
osdWindow: Use float values as input for osdWindow

Using the same type/interval as BarLevel means we can cut out the intermediate
LevelBar class in a follow-up cleanup.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/385

7 years agobarLevel: Return when trying to set value to already used value
verdre [Sat, 2 Feb 2019 17:01:56 +0000 (18:01 +0100)]
barLevel: Return when trying to set value to already used value

There are some cases (for example when tweening value changes), where
the level will be set to the same value it already is at. Avoid those
unnecessary repaints by checking whether the value is already used and
returning if it is.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/385

7 years agobarLevel: Use setters instead of methods
Florian Müllner [Thu, 25 Jul 2019 15:33:00 +0000 (17:33 +0200)]
barLevel: Use setters instead of methods

Switching to getters/setters make the code suitable for using
with Tweener and as GObject properties, both of which we'll
do soon enough.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/385

7 years agovolume: Remove unused method
verdre [Sat, 2 Feb 2019 17:55:11 +0000 (18:55 +0100)]
volume: Remove unused method

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/385

7 years agoUpdate Friulian translation
Fabio Tomat [Sun, 28 Jul 2019 07:37:16 +0000 (07:37 +0000)]
Update Friulian translation

7 years agoUpdate Catalan translation
Jordi Mas [Sat, 27 Jul 2019 22:49:20 +0000 (00:49 +0200)]
Update Catalan translation

7 years agoUpdate Indonesian translation
Kukuh Syafaat [Fri, 26 Jul 2019 11:24:57 +0000 (11:24 +0000)]
Update Indonesian translation

7 years agoci: Remove path limitation of js60 check
Florian Müllner [Thu, 25 Jul 2019 20:33:18 +0000 (22:33 +0200)]
ci: Remove path limitation of js60 check

The check is supposed to run for all merge requests that touch javascript
files, but for some reason I see it's skipped quite often. Better have
the test run unnecessarily some times than let bugs through, so remove
the limitation.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/647

7 years agoci: Fix identifying commits in MR
Florian Müllner [Thu, 25 Jul 2019 20:26:19 +0000 (22:26 +0200)]
ci: Fix identifying commits in MR

When a MR uses a private namespace, "origin" refers to that, and its
master branch may be outdated with regard to upstream master.

We are really only interested in checking the line changes from the commits
in the MR, so figure out the correct branch point instead.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/647

7 years agodocs: Fix interface prefix for D-Bus docs
Bastien Nocera [Thu, 25 Jul 2019 12:40:11 +0000 (14:40 +0200)]
docs: Fix interface prefix for D-Bus docs

The --interface-prefix= gtk-doc argument was being passed a stringified
array instead of a simple string.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/644

7 years agoUpdate Basque translation
Asier Sarasua Garmendia [Thu, 25 Jul 2019 06:43:46 +0000 (06:43 +0000)]
Update Basque translation

7 years agoappDisplay: Trivial code style improvement
Georges Basile Stavracas Neto [Sat, 29 Jun 2019 02:46:16 +0000 (23:46 -0300)]
appDisplay: Trivial code style improvement

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/643

7 years agobaseIcon: Align labels to the center
Georges Basile Stavracas Neto [Wed, 3 Jul 2019 16:27:21 +0000 (13:27 -0300)]
baseIcon: Align labels to the center

Ensure icon labels are aligned to the center, both
vertically and horizontally. This will be required
for using BaseIcons as drag actors.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/643

7 years agoappIcon: End running drag operations on destroy
Georges Basile Stavracas Neto [Sat, 29 Jun 2019 04:32:40 +0000 (01:32 -0300)]
appIcon: End running drag operations on destroy

AppIcon makes itself draggable, and handles the various DnD
routines such as 'drag-begin' and 'drag-end' by making the
Overview emit the appropriate signals.

However, when destroyed, the AppIcon does not try to finish
any drag operations that started. That causes the event
blocker in AllView not to be updated correctly when dragging
icons to outside folders.

Make AppIcon emit 'item-drag-end' when a drag operation
started and it's destroyed.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/643

7 years agoUpdate Karbi translation
Jor Teron [Wed, 24 Jul 2019 18:42:40 +0000 (18:42 +0000)]
Update Karbi translation

7 years agoUpdated Spanish translation
Daniel Mustieles [Wed, 24 Jul 2019 07:51:21 +0000 (09:51 +0200)]
Updated Spanish translation

7 years agoUpdate Karbi translation
Jor Teron [Wed, 24 Jul 2019 03:11:21 +0000 (03:11 +0000)]
Update Karbi translation

7 years agoci: Add eslint job to review stage
Florian Müllner [Sun, 30 Jun 2019 11:05:04 +0000 (13:05 +0200)]
ci: Add eslint job to review stage

We have now reduced the number of eslint errors enough to add it to
the CI pipeline. There are still plenty of errors left though, so we
cannot simply run eslint and fail on any errors. So instead, run it
through a fancy script that:

 - generates an eslint report using the "regular" configuration
 - generates an eslint report using the "legacy" configuration
 - creates a combined report with errors common to both configurations

When the pipeline is running for a branch or tag, the final report is
printed out and the job succeeds (we know there are errors left);
when the pipelne is running for a merge request, we fail if any errors
are reported for the lines modified/added by the MR.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/627

7 years agoci: Merge 'source_check' stage into 'review'
Florian Müllner [Tue, 23 Jul 2019 22:29:15 +0000 (00:29 +0200)]
ci: Merge 'source_check' stage into 'review'

GNOME apps use 'review' for the CI stage that generates and exports a
flatpak bundle after a successful build, so they need some other name
for anything that is checked before building; that's how we ended up
with the somewhat awkward 'source_check' stage (inherited from Polari).

But since the commit log check added a 'review' stage that runs pre-build,
use that for all checks that are performed before the build stage.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/627

7 years agoci: Include git in extension-ci image
Florian Müllner [Thu, 4 Jul 2019 15:35:48 +0000 (17:35 +0200)]
ci: Include git in extension-ci image

It's useful for anything that does not want to limit itself to the
checked out branch, like comparing source and target branch.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/627

7 years agoperf: Shut up another eslint error
Florian Müllner [Sat, 29 Jun 2019 13:14:37 +0000 (15:14 +0200)]
perf: Shut up another eslint error

The functions here are asynchronous to handle control back to the
mainloop while waiting for an action to complete, not to run operations
in parallel. That is, the race condition the rule is protecting against
isn't an issue here, so disable the error.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/627

7 years agoperf: Shut up an eslint error
Florian Müllner [Mon, 4 Feb 2019 12:14:09 +0000 (13:14 +0100)]
perf: Shut up an eslint error

The while(true) loop is intentional here and not a bug, so disable
the corresponding eslint rule.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/627

7 years agostyle: Disable camelcase rule for GObject properties
Florian Müllner [Fri, 1 Feb 2019 00:16:20 +0000 (01:16 +0100)]
style: Disable camelcase rule for GObject properties

For GObject properties, we follow the convention of all-lowercase,
dash-separated names. Those translate to underscores in getters/setters,
so exempt them from the newly added "camelcase" rule.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/627

7 years agocleanup: Mark globals used from other modules as exported
Florian Müllner [Thu, 31 Jan 2019 14:07:06 +0000 (15:07 +0100)]
cleanup: Mark globals used from other modules as exported

eslint cannot figure out that those symbols are used from other modules
via imports, so they trigger unused-variable errors. To fix, explicitly
mark those symbols as exported.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/627

7 years agocleanup: Mark unused (but useful) variables as ignored
Florian Müllner [Thu, 31 Jan 2019 14:08:00 +0000 (15:08 +0100)]
cleanup: Mark unused (but useful) variables as ignored

While we aren't using those destructured variables, they are still useful
to document the meaning of those elements. We don't want eslint to keep
warning about them though, so mark them accordingly.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/627

7 years agocleanup: Remove some unhelpful unused variables in destructuring
Florian Müllner [Fri, 1 Feb 2019 13:41:55 +0000 (14:41 +0100)]
cleanup: Remove some unhelpful unused variables in destructuring

We aren't using them, and they don't add much in terms of clarity,
so drop them to fix a couple of eslint errors.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/627

7 years agocleanup: Mark unused arguments as unused
Florian Müllner [Thu, 31 Jan 2019 14:08:10 +0000 (15:08 +0100)]
cleanup: Mark unused arguments as unused

This will stop eslint from warning about them, while keeping their
self-documenting benefit.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/627

7 years agocleanup: Remove some unhelpful unused arguments
Florian Müllner [Mon, 4 Feb 2019 11:30:53 +0000 (12:30 +0100)]
cleanup: Remove some unhelpful unused arguments

Those unused arguments aren't bugs - unbeknownst to eslint, they all
correspond to valid signal parameters - but they don't contribute
anything to clarity, so just remove them anyway.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/627

7 years agolint: Allow marking variables/arguments as unused
Florian Müllner [Mon, 28 Jan 2019 00:37:12 +0000 (01:37 +0100)]
lint: Allow marking variables/arguments as unused

Unused variables or arguments can indicate bugs, but they can also
help document the code, in particular in case of signal handlers
and destructuring.

Account for this by keeping the error, but set up patterns that allow
us to opt out of if for individual variables/arguments. For arguments
we pick a '_' prefix, while for variables we go with a suffix instead,
to not accidentally exempt private module-scope variables.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/627

7 years agobuild: Automatically bump mutter API version each cycle
Florian Müllner [Tue, 23 Jul 2019 20:34:58 +0000 (22:34 +0200)]
build: Automatically bump mutter API version each cycle

Mutter will now bump the API version automatically at the
beginning of a new development cycle; do the same here.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/641

7 years agoUpdate Esperanto translation
Kristjan SCHMIDT [Tue, 23 Jul 2019 19:08:49 +0000 (19:08 +0000)]
Update Esperanto translation

7 years agopanel: Remove unused constant
Florian Müllner [Tue, 23 Jul 2019 17:59:53 +0000 (19:59 +0200)]
panel: Remove unused constant

This was left-over in commit 2743f18af, and probably is the real reason
why the busy spinner wasn't using the shared AnimatedIcon.Spinner class:
The animation there was much slower.

Still, let's keep the code as-is for now, if we really need a different
animation time, we can add an optional constructor parameter to the
Spinner class.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/640

7 years agoappDisplay: Indent with spaces rather than tabs
Florian Müllner [Tue, 23 Jul 2019 17:58:05 +0000 (19:58 +0200)]
appDisplay: Indent with spaces rather than tabs

Another style nit that sneaked in with commit eaa32090b9.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/640

7 years agoappDisplay: Add missing semicolon
Florian Müllner [Tue, 23 Jul 2019 17:42:16 +0000 (19:42 +0200)]
appDisplay: Add missing semicolon

This slipped through in commit eaa320 ...

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/640

7 years agoappDisplay: Keep popup open on refresh
Ray Strode [Thu, 18 Jul 2019 15:13:27 +0000 (11:13 -0400)]
appDisplay: Keep popup open on refresh

If the list of applications is refreshed we currently close
the open app folder.

This commit adds logic to reopen the app folder on reload.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/628

7 years agoappDisplay: Add open method to FolderIcon
Ray Strode [Thu, 18 Jul 2019 14:19:13 +0000 (10:19 -0400)]
appDisplay: Add open method to FolderIcon

At the moment the only way to open a folder icon is to click on it;
there's no API to open the icon programmatically.

This commits adds an open method and makes the click handler use
it.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/628

7 years agoappDisplay: Stop watching FolderIcon parent view when destroyed
Ray Strode [Thu, 18 Jul 2019 18:49:30 +0000 (14:49 -0400)]
appDisplay: Stop watching FolderIcon parent view when destroyed

When a FolderIcon is opened, it asks the parent view to allocate
space for it, which takes time.  Eventually, the space-ready
signal is emitted on the view and the icon can make use of the new
space with its popup.  If the icon gets destroyed in the
interim, though, space-ready signal handler still fires.

This commit disconnects the signal handler so it doesn't get called
on a destroyed icon.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/628

7 years agoappDisplay: Add destroy handler for FolderIcon
Ray Strode [Mon, 22 Jul 2019 14:57:57 +0000 (10:57 -0400)]
appDisplay: Add destroy handler for FolderIcon

It is important that the FolderView of a FolderIcon always
gets destroyed before the AppFolderPopup, since the view
may or may not be in the popup, and the view should
get cleaned up exactly once in either case.

This commit adds a destroy handler on FolderIcon to ensure
things get taken down in the right order, and to make sure
the view isn't leaked if it's not yet part of the popup.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/628

7 years agoappDisplay: Clear AllView reference to current popup when destroyed
Ray Strode [Thu, 18 Jul 2019 14:06:38 +0000 (10:06 -0400)]
appDisplay: Clear AllView reference to current popup when destroyed

AllView contains a reference to the current popup that lingers after
the popup is destroyed.

This commit fixes that, by explicitly nullifying when appropriate.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/628

7 years agoappDisplay: Add AppFolderPopup destroy handler
Ray Strode [Mon, 22 Jul 2019 15:02:10 +0000 (11:02 -0400)]
appDisplay: Add AppFolderPopup destroy handler

At the moment AppFolderPopup calls popdown on destruction,
which leads to open-state-changed getting emitted after
the actor associated with the popup is destroyed.

This commit handles ungrabbing and closing from an
actor destroy handler to side-step the open-state-changed
signal.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/628

7 years agoiconGrid: Clear meta_later callback on destruction
Ray Strode [Mon, 22 Jul 2019 15:06:30 +0000 (11:06 -0400)]
iconGrid: Clear meta_later callback on destruction

The IconGrid code sometimes sets up a callback to be invoked
later right before being destroyed.

This commit adds a destroy handler to cancel the callback.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/628

7 years agoappDisplay: Don't leak duplicate items in AppView
Ray Strode [Mon, 15 Jul 2019 17:52:58 +0000 (13:52 -0400)]
appDisplay: Don't leak duplicate items in AppView

If an icon already exists in an app view with the same id, the
duplicate is not added on a call to addItem.  Unfortunately,
since it's not added, the icon actor gets orphaned and leaked.

This commit address the problem by introducing a new hasItem
method and disallowing callers to call addItem with a duplicate
in the first place.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/628

7 years agoiconGrid: Add missing import for GLib
Daniel van Vugt [Tue, 23 Jul 2019 06:14:50 +0000 (14:14 +0800)]
iconGrid: Add missing import for GLib

To silence warnings:

JS ERROR: ReferenceError: GLib is not defined
_updateIconSizes@resource:///org/gnome/shell/ui/iconGrid.js:771:9

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1462

7 years agojs: Add missing return values to later_add() handlers
Florian Müllner [Mon, 22 Jul 2019 18:37:33 +0000 (20:37 +0200)]
js: Add missing return values to later_add() handlers

meta_later_add() is modelled after g_idle_add() and friends, and
the handler's boolean return value determines whether it should
be scheduled again or removed. There are some places where we omit
the return value, add them (although the implicit return value of
"undefined" already gives us the intended result).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/637

7 years agopanel: Use dedicated Spinner class
Florian Müllner [Mon, 22 Jul 2019 14:46:40 +0000 (16:46 +0200)]
panel: Use dedicated Spinner class

The startup/busy indication in the app menu was left out of commit
22e21ad7d1 because it doesn't use a hard-coded image, but as the
image in the CSS is actually the same used by the spinner class,
drop the "custom" styling and use the regular spinner.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/636

7 years agoextensionPrefs: Add missing return value
Florian Müllner [Sat, 20 Jul 2019 22:07:00 +0000 (00:07 +0200)]
extensionPrefs: Add missing return value

When commit a7ec7583aaa17 merged two functions into one, it left
out the expected return value from one branch.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/635

7 years agolint: Enforce consistent return
Florian Müllner [Tue, 12 Feb 2019 10:07:55 +0000 (11:07 +0100)]
lint: Enforce consistent return

While all javascript functions have a return value - either an explicit
one from a return statement, or an implicit "undefined" - mixing both in
the same function is almost certainly an oversight, and more often than
not a bug.

Enable the corresponding eslint rule to catch those errors.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/635

7 years agoUpdate Brazilian Portuguese translation
Rafael Fontenelle [Mon, 22 Jul 2019 02:49:59 +0000 (02:49 +0000)]
Update Brazilian Portuguese translation

7 years agoUpdate Basque translation
Asier Sarasua Garmendia [Sun, 21 Jul 2019 18:27:36 +0000 (18:27 +0000)]
Update Basque translation

7 years agobuild: Bump gsettings-desktop-schemas requirement
Florian Müllner [Sat, 20 Jul 2019 16:25:29 +0000 (18:25 +0200)]
build: Bump gsettings-desktop-schemas requirement

... for the new disable-hot-corners setting.

7 years agoBump version to 3.33.4
Florian Müllner [Sat, 20 Jul 2019 15:43:47 +0000 (17:43 +0200)]
Bump version to 3.33.4

Update NEWS.

7 years agoextensionSystem: Allow disabling session mode extensions
Didier Roche [Wed, 17 Jan 2018 12:43:11 +0000 (13:43 +0100)]
extensionSystem: Allow disabling session mode extensions

Trying to disable an extension that is enabled by the session mode
currently has no effect, which is clearly confusing. We could update
the various extension UIs to reflect that via sensitivity, but being
unable to configure extensions based on which session the user picked
at login isn't obvious either.

So instead, add a 'disabled-extensions' gsettings key to list extensions
that should not be enabled which takes precedence over 'enabled-extensions'
and can be used to disable session mode extensions.

https://bugzilla.gnome.org/show_bug.cgi?id=789852

7 years agoextensionSystem: Store extensions in a Map
Florian Müllner [Sun, 7 Jul 2019 22:01:11 +0000 (00:01 +0200)]
extensionSystem: Store extensions in a Map

After making the extensions map private to the ExtensionManager, we can
switch it to a proper hash table which is more appropriate.

https://bugzilla.gnome.org/show_bug.cgi?id=789852

7 years agoextensionSystem: Move extension loading into ExtensionManager
Florian Müllner [Sun, 7 Jul 2019 21:38:27 +0000 (23:38 +0200)]
extensionSystem: Move extension loading into ExtensionManager

Now that extension loading and the extensions map are no longer shared
between the gnome-shell and gnome-shell-extension-prefs processes, we
can move both into the ExtensionManager which makes much more sense
conceptually.

https://bugzilla.gnome.org/show_bug.cgi?id=789852

7 years agoextensionPrefs: Switch to D-Bus API to get extension live state
Didier Roche [Thu, 1 Nov 2018 12:55:17 +0000 (13:55 +0100)]
extensionPrefs: Switch to D-Bus API to get extension live state

By direclty using the underlying GSetting, whether or not an extension
appears as enabled or disabled currently depends only on whether it is
included in the 'enabled-extensions' list or not.

However this doesn't necessarily reflect the real extension state, as an
extension may be in error state, or enabled via the session mode.

Switch to the extensions D-Bus API to ensure that the list of extensions
and each extension's state correctly reflects the state in gnome-shell.

https://bugzilla.gnome.org/show_bug.cgi?id=789852

7 years agoextensionPrefs: Override getCurrentExtension() for extensions
Florian Müllner [Fri, 5 Jul 2019 23:48:05 +0000 (01:48 +0200)]
extensionPrefs: Override getCurrentExtension() for extensions

Extensions are used to calling the getCurrentExtension() utility function,
both from the extension itself and from its preferences. For the latter,
that relies on the extensions map in ExtensionUtils being populated from
the separated extension-prefs process just like from gnome-shell.

This won't be the case anymore when we switch to the extensions D-Bus API,
but as we know which extension we are showing the prefs dialog for, we
can patch in a simple replacement that gives extensions the expected API.

https://bugzilla.gnome.org/show_bug.cgi?id=789852

7 years agoextensionPrefs: Attach extension object to each row
Didier Roche [Thu, 1 Nov 2018 12:50:30 +0000 (13:50 +0100)]
extensionPrefs: Attach extension object to each row

Each row represents an extension, so it makes sense to associate the
rows with the actual extensions instead of linking rows and extensions
by looking up the UUID in the external extensions map in ExtensionUtils.

This will also make it much easier to stop using the shared extension
loading / map in favor of the extension D-Bus API.

https://bugzilla.gnome.org/show_bug.cgi?id=789852

7 years agoextensionSystem: Add canChange property to extensions
Didier Roche [Tue, 4 Dec 2018 08:31:27 +0000 (09:31 +0100)]
extensionSystem: Add canChange property to extensions

Whether or not an extension can be enabled/disabled depends on various
factors: Whether the extension is in error state, whether user extensions
are disabled and whether the underlying GSettings keys are writable.

This is complex enough to share the logic, so add it to the extension
properties that are exposed over D-Bus.

https://bugzilla.gnome.org/show_bug.cgi?id=789852

7 years agoshellDBus: Add new 'ExtensionStateChanged' signal
Florian Müllner [Mon, 8 Jul 2019 10:21:10 +0000 (12:21 +0200)]
shellDBus: Add new 'ExtensionStateChanged' signal

The existing 'ExtensionStatusChanged' signal has a fixed set of parameters,
which means we cannot add additional state without an API break.  Deprecate
it in favor of a new 'ExtensionStateChanged' signal which addresses this
issue by taking the full serialized extension as parameter.

https://bugzilla.gnome.org/show_bug.cgi?id=789852

7 years agoextensionUtils: Add functions to (de)serialize extensions
Didier Roche [Thu, 1 Nov 2018 12:55:17 +0000 (13:55 +0100)]
extensionUtils: Add functions to (de)serialize extensions

Serializing an extension for sending over D-Bus is currently done by the
appropriate D-Bus method implementations. Split out the code as utility
function and add a corresponding deserialization function, which we will
soon use when consuming the D-Bus extension API from the extension-prefs
tool.

https://bugzilla.gnome.org/show_bug.cgi?id=789852

7 years agoextensionSystem: Add methods to enable/disable extensions
Didier Roche [Wed, 17 Jan 2018 12:43:11 +0000 (13:43 +0100)]
extensionSystem: Add methods to enable/disable extensions

Extensions are currently enabled or disabled by directly changing the
list in the 'enabled-extensions' GSettings key. As we will soon add
an overriding 'disabled-extensions' key as well, it makes sense to
offer explicit API for enabling/disabling to avoid duplicating the
logic.

For the corresponding D-Bus API, the methods were even mentioned in
the GSettings schema, albeit unimplemented until now.

https://bugzilla.gnome.org/show_bug.cgi?id=789852

7 years agoextensionSystem: Make methods to call extension functions private
Florian Müllner [Mon, 8 Jul 2019 00:53:32 +0000 (02:53 +0200)]
extensionSystem: Make methods to call extension functions private

While public methods to enable/disable extensions make sense for an
extension manager, the existing ones are only used internally. Make
them private and rename them, so that we can re-use the current
names for more useful public methods.

https://bugzilla.gnome.org/show_bug.cgi?id=789852

7 years agoextensionSystem: Turn into a class
Florian Müllner [Thu, 7 Mar 2019 00:45:45 +0000 (01:45 +0100)]
extensionSystem: Turn into a class

The extension system started out as a set of simple functions, but
gained more state later, and even some hacks to emit signals without
having an object to emit them on.

There is no good reason for that weirdness, so rather than imitating an
object, wrap the existing system into a real ExtensionManager object.

https://bugzilla.gnome.org/show_bug.cgi?id=789852

7 years agoextensionUtils: Move ExtensionState definition here
Florian Müllner [Sat, 6 Jul 2019 13:31:57 +0000 (15:31 +0200)]
extensionUtils: Move ExtensionState definition here

It makes sense to keep extension-related enums in the same module instead
of spreading them between ExtensionSystem and ExtensionUtils.

More importantly, this will make the type available to the extensions-prefs
tool (which runs in a different process and therefore only has access to
a limited set of modules).

https://bugzilla.gnome.org/show_bug.cgi?id=789852

7 years agobuild: Clean out unused version requirements
Florian Müllner [Sat, 20 Jul 2019 10:38:04 +0000 (12:38 +0200)]
build: Clean out unused version requirements

We haven't linked to those libraries in years ...

7 years agobackground: Adjust to gnome-desktop API break
Florian Müllner [Sat, 20 Jul 2019 10:11:55 +0000 (12:11 +0200)]
background: Adjust to gnome-desktop API break

gnome-desktop broke API in commit ca5d61cf24, as it didn't *add* a property
as incorrectly stated in the commit message, but *replaced* an existing one.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1457

7 years agomain: Avoid missing braces warnings when compiling with clang
Ting-Wei Lan [Sat, 20 Jul 2019 08:28:53 +0000 (16:28 +0800)]
main: Avoid missing braces warnings when compiling with clang

Since -Werror=missing-braces is used, having missing braces warnings
aren't allowed. However, the first member of struct sigaction is a union
whose first member is a pointer, causing clang to produce warnings when
it is initialized to { 0 }.

Instead of initializing to a zero value, we can specify values of
members directly in the initializer to avoid warnings.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/633

7 years agopower: Make sure we fall back to the correct icon
Florian Müllner [Mon, 15 Jul 2019 22:37:13 +0000 (00:37 +0200)]
power: Make sure we fall back to the correct icon

Commit bd18313d12 changed to a new naming scheme for battery icons,
and used to old icon names as fallback-icon-name for compatibility
with older/other icon themes.

However that fallback code isn't working correctly, as GThemedIcon's
default fallbacks will transform a name of `battery-level-90-symbolic`
to a list of names:
 - `battery-level-90-symbolic`
 - `battery-level-symbolic`
 - `battery-symbolic`

The last one frequently exists, so instead of the intended fallback,
we end up with a generic battery icon.

Address this by specifying the icon as GIcon instead of an icon-name,
where we have more control over how the icon is resolved.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1442

7 years agoshell: Don't use g_memmove()
Florian Müllner [Wed, 17 Jul 2019 15:20:08 +0000 (17:20 +0200)]
shell: Don't use g_memmove()

Glib stopped providing any fallback implementations on systems without
memmove() all the way back in 2013. Since then, the symbol is a simple
macro around memmove(); use that function directly now that glib added
a deprecation warning.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/632

7 years agoworkspacesView: Support horizontal layout
Florian Müllner [Tue, 4 Jun 2019 19:49:23 +0000 (19:49 +0000)]
workspacesView: Support horizontal layout

Just as we did for the workspace switcher popup, support workspaces
being laid out in a single row in the window picker.

Note that this takes care of the various workspace switch actions in
the overview (scrolling, panning, touch(pad) gestures) as well as the
switch animation, but not of the overview's workspace switcher component.

There are currently no plans to support other layouts there, as the
component is inherently vertical (in fact, it was the whole reason for
switching the layout in the first place).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/575

7 years agoworkspaceSwitcherPopup: Support horizontal layout
Florian Müllner [Tue, 4 Jun 2019 19:22:26 +0000 (19:22 +0000)]
workspaceSwitcherPopup: Support horizontal layout

While mutter supports a variety of different grid layouts (n columns/rows,
growing vertically or horizontally from any of the four corners), we
hardcode a fixed vertical layout of a single column.

Now that mutter exposes the actual layout to us, add support for a more
traditional horizontal layout as well.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/575

7 years agotheme: app icon helper tweaks
Jakub Steiner [Thu, 18 Jul 2019 03:03:08 +0000 (05:03 +0200)]
theme: app icon helper tweaks

Shell cannot composite multiple shadows, simplify to only use one.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/168

7 years agoextensionPrefs: Inherit from Gtk.Application
Marco Trevisan (Treviño) [Tue, 28 May 2019 21:22:37 +0000 (23:22 +0200)]
extensionPrefs: Inherit from Gtk.Application

Extension preferences Application class is just a container for a GtkApplication
so instead of using composition we can inherit from the base GObject class.

Also replace signal connections with vfunc's.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/631

7 years agotheme: make overview thumbnails rounder
Jakub Steiner [Tue, 16 Jul 2019 03:27:34 +0000 (05:27 +0200)]
theme: make overview thumbnails rounder

- match gtk Adwaita

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1449

7 years agotheme: unbreak acrive states for icon tiles
Jakub Steiner [Mon, 15 Jul 2019 22:16:32 +0000 (00:16 +0200)]
theme: unbreak acrive states for icon tiles

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1446

7 years agotheme: Provide icon helper classes
Jakub Steiner [Mon, 15 Jul 2019 22:04:48 +0000 (00:04 +0200)]
theme: Provide icon helper classes

- to help present icons on light backgrounds, the new fullcolor
  icons need some help. Mimic gtk styles

Needed for https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/168

7 years agoUpdate Karbi translation
Jor Teron [Tue, 16 Jul 2019 02:39:07 +0000 (02:39 +0000)]
Update Karbi translation

7 years agosearch: Remove wrong additional argument for _createResultDisplay
Jonas Dreßler [Tue, 9 Jul 2019 15:17:06 +0000 (17:17 +0200)]
search: Remove wrong additional argument for _createResultDisplay

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/110

7 years agoiconGrid: Make sure the style is updated before computing the layout
Jonas Dreßler [Sat, 24 Nov 2018 23:57:00 +0000 (00:57 +0100)]
iconGrid: Make sure the style is updated before computing the layout

In some cases the style-changed signal hasn't been emitted when
_computeLayout() is called, resulting in the use of the default spacing
and item size values for the calculations.

One case where this happens is when starting a search. Right after the
initialization of GridSearchResults, _computeLayout() is called from
_getMaxDisplayedResults() and the style-changed signal hasn't been
emitted yet. The computed layout will be wrong and the maximum
number of results will also be wrong.

To prevent this from happening, make sure the style has been updated
before doing the calculations in _computeLayout().

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/110

7 years agosearch: Fix calculation of max number of displayed results for grid
Jonas Dreßler [Sat, 24 Nov 2018 23:57:00 +0000 (00:57 +0100)]
search: Fix calculation of max number of displayed results for grid

The calculation of how many results can be shown in GridSearchResults is
broken: The width of the parent container (resultsView.actor) we're
using as the maximum width right now is the width of the scrollView of
SearchResults (which always expands to the whole screen size). This
width will only be correct if the scrollView (ie. the whole screen) is
smaller than the max width of searchResultsContent, which only is the
case for screens smaller than 1000px.

To fix the calculation, use the width of our own actor and don't get it
using clutter_actor_get_width(), but using the last allocation of the
actor. This way we don't get the preferred width if the actor is not
allocated at this point (it's hidden by _ensureProviderDisplay() when
starting a new search).

Then, when the allocation of the actor changes, rebuild the grid search
results by calling updateSearch() with the old arguments to ensure the
number of visible results is correct. The fact that we're only listening
for allocation changes here is the reason why we never want to use the
preferred width of the actor inside _getMaxDisplayedResults(): While
the actor is hidden clutter_actor_get_width() would return the preferred
width, which we'd then use the as the maximum width. But if the actor
had a correct allocation before, no notify::allocation signal will be
emitted when the actor is shown again because the allocation is still
the same, and we'll end up using the preferred width as maximium width
forever.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/110

7 years agotheme: Don't apply overlap-preventing padding to search results
Jonas Dreßler [Sat, 24 Nov 2018 21:42:51 +0000 (22:42 +0100)]
theme: Don't apply overlap-preventing padding to search results

Unlike the app grid, we show the search results while the dash is hidden
and with a small scrollbar instead of page indicator dots. This
means there's nothing the search results might horizontally overlap
with and the padding here is unneccessary.

The spacing between the search results and the screen edges is still
sufficient because of the paddings applied to searchResultsContent.

On very small screens (< 1000px), this allows the search results to
utilize a lot more of the horizontal screen space.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/110

7 years agosearch: Remove unnecessary containers
Jonas Dreßler [Sat, 24 Nov 2018 21:33:05 +0000 (22:33 +0100)]
search: Remove unnecessary containers

The functionality the searchResultsBin container provides can easily be
moved into a subclass of St.BoxLayout, no need for an additional StBin.
The "searchResultsBin" css class isn't used in the stylesheets either.

Same with the scrollChild container.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/110

7 years agoUpdate Karbi translation
Jor Teron [Mon, 15 Jul 2019 10:54:50 +0000 (10:54 +0000)]
Update Karbi translation

7 years agoshellDBus: Rename ShowMonitorLabels2 to ShowMonitorLabels
Benjamin Berg [Thu, 11 Apr 2019 17:43:35 +0000 (19:43 +0200)]
shellDBus: Rename ShowMonitorLabels2 to ShowMonitorLabels

The original ShowMonitorLabels has been removed so we can change things
back to use ShowMonitorLabels again.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/491

7 years agoAdd Karbi translation
Jor Teron [Sun, 14 Jul 2019 04:02:53 +0000 (04:02 +0000)]
Add Karbi translation

7 years agopower: Use more fine-grained battery levels
Florian Müllner [Tue, 28 May 2019 17:56:36 +0000 (17:56 +0000)]
power: Use more fine-grained battery levels

Adwaita-icon-theme added new battery icons which represent battery levels
in 10% steps[0]. Use these if they are available, otherwise fall back to
the existing icon names for compatibility with older icon themes.

[0] https://gitlab.gnome.org/GNOME/adwaita-icon-theme/issues/6

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/561

7 years agocalendar: Simplify code a bit
Florian Müllner [Fri, 12 Jul 2019 03:25:54 +0000 (05:25 +0200)]
calendar: Simplify code a bit

Just make the error case the same as the no-appointments one.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/626

7 years agocalendar: Avoid a warning
Florian Müllner [Fri, 12 Jul 2019 03:25:54 +0000 (05:25 +0200)]
calendar: Avoid a warning

We will always get a results array from gjs' proxy wrapper, but it
will be empty in the error case; that is, `results` is always defined,
but `results[0]` may not be.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/626

7 years agodialog: Use Object.assign() for default property value
Florian Müllner [Sat, 29 Jun 2019 23:03:46 +0000 (01:03 +0200)]
dialog: Use Object.assign() for default property value

Either Params.parse() or Object.assign() are more concise for providing
default values in object literals (sadly default parameters won't work
here).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/626

7 years agocleanup: Use default parameters where appropriate
Florian Müllner [Thu, 11 Jul 2019 23:31:38 +0000 (01:31 +0200)]
cleanup: Use default parameters where appropriate

Since ES6 it is possible to set an explicit default value for optional
parameters (overriding the implicit value of 'undefined'). Use them
for a nice small cleanup.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/626

7 years agopanel: Relax check for existing signal handler
Florian Müllner [Sat, 29 Jun 2019 23:04:32 +0000 (01:04 +0200)]
panel: Relax check for existing signal handler

Object.prototype.hasOwnProperty() is more precise than checking for
falsiness, for instance the following is true:

  { foo: undefined }.hasOwnProperty('foo');

However when checking for a handler ID, a more relaxed check is more
appropriate, as particularly 0 is not a valid handler ID.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/626

7 years agocleanup: Don't call method via a parent's prototype
Florian Müllner [Tue, 24 Jul 2018 09:49:00 +0000 (11:49 +0200)]
cleanup: Don't call method via a parent's prototype

We cannot disconnect a signal handler via the usual disconnect() as
nm_device_disconnect() shadows the GObject method, but we can use
g_signal_handler_disconnect().

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/626

7 years agolint: Add "legacy" configuration
Florian Müllner [Mon, 28 Jan 2019 00:45:10 +0000 (01:45 +0100)]
lint: Add "legacy" configuration

Regarding coding style, gjs is moving in a direction that departs quite
significantly from the established style, in particular when indenting
multi-line array/object literals or method arguments:

Currently we are keeping those elements aligned, while the gjs rules now
expect them to use the regular 4-space indentation.

There are certainly good arguments that can be made for that move - it's
much less prone to leading to overly-long lines, and matches popluar JS
styles elsewhere. But switching coding style implies large diffs which
interfere with git-blame and friends, so in order to allow for a more
gradual change, add a separate set of "legacy" rules that match more
closely the style we would expect up to now.

It also disables the rules for quotes and template strings - the former
because we cannot match the current style to use double-quotes for
translatable strings and single-quotes otherwise, the latter because
template strings are still relatively new, so we haven't adopted them
yet.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/609